﻿using System;

namespace Monti.MVVM.Commands
{
   /// <summary>
   /// Represents an object that hold data about an event needing handling.
   /// </summary>
   public class HandlerData
   {
      /// <summary>
      /// Initializes a new handler data object.
      /// </summary>
      /// <param name="sender">Sender of the event.</param>
      /// <param name="commandParameter">Parameter of the event.</param>
      /// <param name="eventArgs">Argments of the event.</param>
      public HandlerData (object sender, object commandParameter, EventArgs eventArgs)
      {
         this.Sender = sender;
         this.CommandParameter = commandParameter;
         this.EventArgs = eventArgs;
      }

      /// <summary>
      /// Gets the sender of the event.
      /// </summary>
      public object Sender { get; private set; }

      /// <summary>
      /// Gets the parameter of the event.
      /// </summary>
      public object CommandParameter { get; private set; }

      /// <summary>
      /// Gets the argments of the event.
      /// </summary>
      public EventArgs EventArgs { get; private set; }

      /// <summary>
      /// Any additional data.
      /// </summary>
      public object Tag { get; set; }
   }
}
